package com.wfh.easychat.service;

import com.wfh.easychat.model.entity.GroupInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wfh.easychat.model.entity.UserInfo;
import com.wfh.easychat.model.enums.GroupJoinTypeEnum;
import com.wfh.easychat.model.vo.GroupInfoVo;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartFile;

/**
* @author fenghuanwang
* @description 针对表【group_info】的数据库操作Service
* @createDate 2025-09-29 18:19:23
*/
public interface GroupInfoService extends IService<GroupInfo> {

    /**
     * 添加群组
     *
     * @param groupName
     * @param groupNotice
     * @param enumByValue
     * @return
     */
    GroupInfoVo addGroup(String groupName, String groupNotice, GroupJoinTypeEnum enumByValue, HttpServletRequest request, MultipartFile avata);

    /**
     * 更新群组信息
     *
     * @param groupName
     * @param groupNotice
     * @param enumByValue
     * @param request
     * @param newAvata
     * @return
     */
    Boolean updateGroup(Integer status, Long id, String groupName, String groupNotice, GroupJoinTypeEnum enumByValue, HttpServletRequest request, MultipartFile newAvata);

    /**
     * 获取群组信息
     * @param id
     * @param loginUser
     * @return
     */
    GroupInfo getGroupInfo(Long id, UserInfo loginUser);
}
